package com.android.ejemplos;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class HolamundoActivity extends Activity /*implements OnClickListener*/ {
    private int i=1;

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       // TextView tv= new TextView(this);
        //tv.setText("Hola Robert, esto es Android");
        setContentView(R.layout.main);
        /*LinearLayout linearLayout = new LinearLayout(this);
        linearLayout.setOrientation(LinearLayout.VERTICAL);
        TextView textView = new TextView(this);
        textView.setText(R.string.hello);
        linearLayout.addView(textView);
        
        Button button = new Button(this);
        linearLayout.addView(button);
        setContentView(linearLayout);
        button.setOnClickListener(this);*/
        
    }

	private void update(Button button) {
		// TODO Auto-generated method stub
		button.setText("click N. "+i++);
	}

	public void onClick(View button) {
		// TODO Auto-generated method stub
		update((Button)button);
	}
}